package org.spamforces.model;

import com.codeforces.commons.text.StringUtil;
import com.codeforces.commons.time.TimeUtil;

import java.util.Date;

/**
 * @author Maxim Shipko (sladethe@gmail.com)
 *         Date: 09.12.14
 */
public class Sms extends ApplicationEntity {
    private String phone;
    private String body;
    private Date sentTime;
    private Status status;
    private long broadcastId;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Date getSentTime() {
        return TimeUtil.toDate(sentTime);
    }

    public void setSentTime(Date sentTime) {
        this.sentTime = TimeUtil.toDate(sentTime);
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public long getBroadcastId() {
        return broadcastId;
    }

    public void setBroadcastId(long broadcastId) {
        this.broadcastId = broadcastId;
    }

    @Override
    public String toString() {
        return StringUtil.toString(this, false, "broadcastId", "phone", "status");
    }
}
